define(['app'],function(app){
    return {module: function($scope, $http, eventBusService, httpService, params) {
        $scope.form = {};

        //保存
        $scope.save = function(){
            if(!$scope.formCheck()){
                return;
            }

            httpService.post(app.urls.stage_insert, $scope.form, function(data){
                if("0000" === data.code){
                    eventBusService.publish("content.page.reload", data.data);
                    eventBusService.publish("modal.page.close",{});
                    
                }else{
                    alert(data.msg);
                }
            });
        }
    }
}});